Repository navigation
feat(agent-platform): make governance a typed input and have a second person approve every governance change - #1053
Conversation
…econcile The platform's governance mode and the servers muster governs become inputs of the agent-platform definition (governance.mode, governance.governedServers), rendered into the meta chart's top-level governance and governedServers and read back from the configmap patch on record, so a reconcile no longer drops them. Validation follows what muster refuses to start on and what the meta chart refuses to render. Every governance choice is refused while no meta chart release renders muster's governance configuration (GovernanceChart unset), so no installation reads as governed while its muster is not.
…loosens GovernanceOf compares the governance and governedServers of an installation's agent-platform values on record and as rendered, with their values, and names the changes that loosen it (governed to trusted, a source no longer governed or back to the chart's entry, a role changed, a safe entry added, one named like a write marked). Values that cannot be read on either side count as a loosening change. The summary reads the governance on a line of its own instead of among the values keys.
… test installations too A commit or wave whose plan changes an installation's governance records the change on the Action (spec.governance) and always asks for the Team review, also where every target is a test installation; requestApproval never records such an action as not requiring review. approve_action keeps refusing the actor, so a second person of the team decides. The review leads with the governance old to new and what loosens it. Every step is audited: committed, self-approval refused, approved, merged, and merged outside the manager without a decision. docs/governance.md describes the input, the rule, the audit lines and the proposed safe list for this manager.
…carry markup A server's role is fixed by the meta chart for its own sources, so an override may no longer change it (muster applies a role's floors by the server's role); a server key of its own must name its role and may not stand for one of the chart's sources. No floor of any role may be safe, safe entries must be tool names and a list holds at most 64. muster's roles and floors and the chart's governedServers now live in definitions/agent-platform/governance.yaml, held to muster and the chart by a test that reads sibling checkouts where present (review S9-02, S9-03, S9-13).
…muster hold A plan's governance change now compares what muster governs on both sides, a source left to the meta chart read as the chart's entry, so a first override shows what it adds and removes and an explicit trusted dropped is no change. Write verbs anywhere in a tool name and floors of any role are marked, values from the record are escaped for Slack, muster's own muster.muster.governance and a muster hold below the release that enforces the governance count, and a disable deleting governed values is a loosening change. Snapshots let an Action record the governance it leaves (review S9-01, S9-03, S9-04, S9-09, S9-10, S9-14).
…k the second person's team Every Action records the governance its commit leaves (spec.governanceAfter; a disable records the governance before it), and a plan compares against the newest reviewed one: a disable followed by an enable, or a change made in the configs repository directly, is a governance change again and asks the review, the outside change named and logged. A disable deleting governed values asks the review on test installations too. Before recording that a test installation needs no review, the commit reads the values on the default branch again. approve_action refuses the actor by GitHub id too, and for a governance change anyone who is not an active member of the approvals.governanceTeam GitHub team or no person, read as the approver and failing closed. A stage merged outside the manager decides nothing for a governance change; such merges are audited in any state, merges per stage with their pull requests and heads. The review puts what loosens first and never cuts it, refusing a change whose loosening lines do not fit, and an Action stored without its governance is refused (review S9-01, S9-03, S9-05, S9-06, S9-07, S9-08, S9-11, S9-15, S9-16).
…afe list's side effects docs/governance.md now says how a change is compared (effective governance, against the last reviewed action), what the definition refuses, who may approve, what the review shows first, every audit line, that a direct edit of the configs repository is detected at the next plan rather than prevented, and that three of the Platform Manager's safe tools bring Action records up to date and post the facts (review S9-06, S9-12).
…he actor under a new login The actor approving under a renamed login with the same GitHub id is refused; the wave's and the disable's commit audit lines are asserted, so removing either call fails a test (review S9-11, S9-16).
…xed platform parts The open-source charts and muster no longer carry anything of Giant Swarm (decision #92), so the definition renders it on every installation it manages: the Platform Manager's role floors (governance.roleFloors: platformManager approve_action and merge_action), the Platform Manager as a governed server with its safe list, where the meta chart takes the governance, and the Giant Swarm admin groups as muster's connector admins (muster.rbac.mcpServerEditor.subjects) on the 4 line. The mode moves to governance.mode. No input changes these parts: an override of giantswarm-platform-manager is refused unless it is the platform's entry read back, and the plan reads a governance without roleFloors as having the platform's, so writing them changes nothing while a floor that goes loosens.
docs/governance.md describes the fixed platform parts the definition renders (role floors, governed server, connector admins), why they are no inputs, the governance.mode input and the drift test against muster and the chart from before and after decision #92.
… workflow editors The agent-platform chart drops them as defaults of muster.rbac.workflowEditor.subjects (decision #93), so the definition renders them on every installation on the 4 line beside the connector admins, fixed and never an input.
…e its parts removed The Platform Manager's MCPServer runs in its release namespace, giantswarm-platform-manager, outside muster's: its governed entry is now giantswarm-platform-manager/giantswarm-platform-manager, and an input naming that server under any key is refused. The plan no longer reads absent role floors or a missing Platform Manager entry as the platform's, so removing them out of band is a loosening governance change. A drift test fails once the meta chart renders the governance while the definition's gates are not set to its floor, so the release order cannot leave Giant Swarm installations without the Platform Manager's floors (review F1, F2).
…ions docs/governance.md now says that the definition's governance gates are set before the chart release that renders the governance, carries the Giant Swarm upgrade snippet agent-platform's UPGRADE.md no longer has (editor groups, role floors, the Platform Manager's governed entry), and names the Platform Manager's server key.
…ge of their own With absent role floors read as none, the first commit that puts Giant Swarm's governance parts on record is a tightening governance change; the tests that need no governance change start from a record that carries them (review F2).
Published Helm chart
|
| Chart | giantswarm-platform-manager |
| Version | 0.96.1-r27740a5ft20261130135621h081b39d |
| OCI reference | oci://gsoci.azurecr.io/charts/giantswarm/giantswarm-platform-manager:0.96.1-r27740a5ft20261130135621h081b39d |
| Digest | sha256:6f19c680534278bee3f6c5dda6875ad4e03345eef93427f80f07be16da0fd6d8 |
| Registry | public — gsoci.azurecr.io |
| Git catalog | giantswarm-test-catalog (index) |
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/giantswarm-platform-manager --version 0.96.1-r27740a5ft20261130135621h081b39dPosted by architect-orb · build 46469 · commit 081b39d · updated in place on every push
… snapshot-less actions A plan now compares the record's governance with what the last reviewed action left also when it writes the agent-platform values as they are on record, so an outside edit is named and logged rather than adopted. Only an action that recorded the governance it leaves can be the baseline; one without a snapshot is skipped, and actions are ordered by their stage's merge, ties by name and logged. A governance merged between the plan and the pull requests is recorded on the action (status.governance) as a loosening change, so its review shows it and only a member of the reviewers' team approves it, for a commit and a wave alike (review D-GO-01, D-GO-02, D-GO-07, D-GO-11).
…es unchanged values docs/governance.md says which actions are a baseline, that an outside edit is shown when the values are written unchanged, that a governance moved under the plan becomes a change of the action, and the new governance_baseline_ambiguous line (review D-GO-01, D-GO-02, D-GO-07).
… write verbs The platform team and the subjects of muster's connector-admin and workflow-editor bindings are part of the governance snapshot: a subject added widens who may loosen approvals and is a loosening change the team reviews, on test installations too; absent editor subjects read as the Giant Swarm groups the definition renders. The write mark reads more verbs (drain, cordon, upgrade, install, terminate, rollout, label, ...) and the words of camelCase names (decision #97, review D-GO-20, D-GO-24).
…ompare every plan with it The governance a plan is compared with is no longer derived from the Actions' order or states. A GovernanceRecord per installation, in the manager's namespace and written only by its ServiceAccount, holds what the team last reviewed: merge_action writes it when it merges the stage of an approved governance change, with the approver and the configs pull request's merged head. Every plan compares the configs repository with it, so an edit outside the manager, a revert by hand or an older action merged after a newer one is an unreviewed change the next commit asks the team to confirm or restore. An installation without a record asks the review while its governance is in play (fail closed; its first reviewed commit records it), and a reviewed change reverted by hand is audited (decision #99, review D-GO-25, D-GO-26, D-GO-31).
docs/governance.md replaces the baseline derived from the Actions with the GovernanceRecord: who writes it and when, what every plan compares, the fail-closed migration of installations without one, and the new audit lines (decision #99).
…unrecorded governance whole Each Action records which record its plan compared with (spec.governanceBase); merge_action merges a stage of an approved governance change, and writes the record, only while the installation's record is still that one, so an approval given against an older record no longer displaces a newer review. Without a record the review shows the governance the commit leaves whole, against the chart's defaults. A reviewed disable marks its record, and the enable after it is compared with the governance from before under its own line instead of reading as an outside change. A ValidatingAdmissionPolicy lets only the manager's ServiceAccount create, update or delete the records, and the CRD holds spec.installation to the object's name (review D-GO-33 to D-GO-36, D-GO-40).
docs/governance.md describes the merge's compare-and-swap, the admission policy on the records, the whole-governance review without a record and the enable after a reviewed disable (review D-GO-33 to D-GO-36).
Review recordPart of giantswarm/giantswarm#38902 (tool approval, slice 9 and the Giant Swarm side of the OSS-neutrality refactor). Purpose: this record says what was reviewed on this branch (governance as a typed input of the agent-platform definition with second-person approval, and the Giant Swarm governance parts rendered as fixed platform parts), by whom and with which outcome, so that reviewers can skip what is covered. Branch Read this first
Review rounds
What was checked
Mutations (round 1): 27 with Findings
Final reviews: delta review, re-checks and last review
Lab verificationNone. The manager is not deployed in agentlab; its effects on muster (floors, the governed entry, workflow editors) were exercised only through muster's own tests and the chart's Open itemsFindings still open or partly fixed:
Never run:
|
# Conflicts: # helm/giantswarm-platform-manager/README.md
Review supplement for giantswarm/giantswarm#38902Reviewed head: SpecThe scoped independent pass supports typed/preserved governance, human team review even on test installations, reviewed-baseline comparison and explicit loosening disclosure. Release floors and cluster rollout remain outstanding prerequisites already documented. This is a scoped contract assessment, not an exhaustive numbered acceptance score. Independent focused specification cross-checks covered the core enforcement/client contracts and platform/manager integration. Declared follow-ups and accepted design changes are not counted as new defects. BlockingNo new blocking code finding established in this pass. Non-blockingNone newly established. SuggestionsNone beyond the existing review follow-ups. Deep verification
Reported checks passed or were skipped; no failed/cancelled check to triage. A skipped job is not evidence that its gate ran. Unverified locally: applicable builds, tests (including race/integration/envtest), vet, formatting/lint/pre-commit, generators, Makefile verification targets, Helm rendering/schema/unit checks, and browser/live-cluster flows. No PR code was executed. GitHub-reported CI provides supporting evidence, not a local reproduction. Large test, fixture and documentation changes were inspected selectively; this is a focused deep review of the contracts above, not exhaustive line-by-line coverage. Recommendation: merge as-is within this review's scope, subject to existing release-order/rollout prerequisites and previously documented open items. This is not sign-off on production cutover: actual compatible release pins and the documented organization/remote-target rollout evidence remain required. Team context: none. |
…s inline approval The input portalWorkloadToken.enabled (off by default) binds muster's muster-approval-decider Role to the portal's ServiceAccount (muster.rbac.approvalDecider.subjects) and has the portal's chart project that ServiceAccount's token for audience muster and name it in muster.workloadTokenFile (backstage.musterWorkloadToken.enabled in the Component's values). The meta chart wires both only for a portal it deploys itself; a portal of the customer-portal definition is a release of its own. Refused while the meta chart, muster or portal chart release carrying it is unset (GovernanceChart, PortalWorkloadTokenChart), off the 4 line, under a hold below them, without a portal on the installation and while the portal's chart line admits no chart that projects the token. Read back from the binding's presence, so a reconcile keeps it.
…t trusts its client The input is now inlineApproval.enabled. Beside the decider binding and the projected token it names the portal's Dex client, backstage as the record reads it, as the portal's own (backstage.oidcClientId) and as muster's one trusted client (muster.muster.approval.trustedClients); a portal signing in through a client of its own is refused. The gates now check what the installation resolves to, not only that a release exists: InlineApprovalChart (the meta chart that sets the trusted-clients floor), InlineApprovalMuster (that floor) and PortalWorkloadTokenChart, a release candidate only where the installation or the portal's chart line follows them, the muster check with or without a hold. A portal on another installation is refused, naming the fallback to muster's approval page. The binding names the ServiceAccount the portal's values on record set (installation.portals[*].serviceAccount), else the chart's default, and the input reads back from that binding in the list, not from the key's presence. Tests cover the parsed subjects, a render and read-back round trip, the 3 line and release candidates.
Review record — portal workload tokenIndependent code and security review by Claude Fable 5.2 of Result after the fixes: 0 blocker, 0 high, 0 medium, 1 low open (security), 1 new low, 3 info. First round: 2 medium, 4 low. Closed: the input now writes the trusted client beside the binding and the token (PT-01); the gates refuse a release candidate where the installation or the portal's line follows stable only, for muster with or without a hold (PT-02); the read-back is the portal's binding in the list, so an empty list reads off (PT-03); tests compare the parsed subjects and round-trip render and read-back (PT-08); the ServiceAccount name comes from the portal's values on record (PT-09). Trusted client: only
|
Review record — merge
|
…e-run-values * origin/main: feat(agent-platform): roll credential-api when its credentials rotate (#1083) feat(agent-platform): let an outside A2A issuer be trusted for its asserted email (#1082) fix(agent-platform): give credential-api's Valkey password a Secret of its own (#1081) fix(deps): update module github.com/mark3labs/mcp-go to v1.7.0 (#1068) feat(agent-platform): keep a hand-set agent chart line and its migration on reconcile (#1080) fix(agent-platform): refresh the credential-api golden for the release gates (#1078) feat(agent-platform): set the tool approval release gates to the epic releases (#1077) fix(agent-platform): format probes.go and refresh the credential-api golden (#1074) feat(agent-platform): run credential-api (#1071) fix: relay muster's URL elicitations with mcp-toolkit v0.15.0 (#1073) feat(agent-platform): render the kagent controller's trusted audiences (#1072) feat(agent-platform): configure the external application entry (#1062) feat(agent-platform): make governance a typed input and have a second person approve every governance change (#1053) # Conflicts: # definitions/agent-platform/README.md
Part of giantswarm/giantswarm#38902. Review records are posted on this PR at the end.
What does this PR do?
The platform's governance (muster's mode and the servers it governs) is now something the Platform Manager writes, reads back and reviews, instead of something a reconcile can drop or one person can loosen alone. Slice 9 of the epic's PRD.
governance.modeandgovernance.governedServersare inputs of the agent-platform definition, rendered into the meta chart's top-levelgovernanceandgovernedServersand read back from the configmap patch on record, so a reconcile no longer drops them. Validation follows what muster refuses to start on and what the meta chart refuses to render. Every governance choice is refused while no meta chart release renders muster's governance configuration, so no installation reads as governed while its muster is not.GovernanceOf) and names what loosens (governed to trusted, a source no longer governed, a role changed, a safe entry added or one named like a write). Values that cannot be read on either side count as a loosening. The comparison is of the effective governance, against the installation's reviewed-governance record (see below), so a disable followed by an enable, or a direct edit of the configs repository, asks again.approve_actionrefuses the actor, by GitHub id too; for a governance change the approver must be an active member of the GitHub teamapprovals.governanceTeam(unset means nobody can approve one, fail closed). A stage merged outside the manager decides nothing. The review puts what loosens first and never cuts it.governance.roleFloors:platformManagerwithapprove_actionandmerge_action), the Platform Manager as a governed server with its safe list (5 read tools), and the Giant Swarm admin groups as muster's connector admins and workflow editors (4 line). The open-source charts and muster no longer carry them (decision recorded in the epic). An override ofgiantswarm-platform-manageris refused unless it is the platform's entry read back.governedServerslive indefinitions/agent-platform/governance.yaml, held to muster and the chart by a test that reads sibling checkouts where present.docs/governance.md: the baseline, the reviewers' team, the safe list's side effects, every audit line, that a direct edit of the configs repository is detected at the next plan and not prevented.Commits (24):
9749dcb,f87631d,6cdb0b4,888334b(the input, the review, the second person),6ec0eb0,ea37b12,c655359,ed3196f,1f2f326(review fixes, docs, e2e),9c83a93,3eb427a,2340c45(the fixed platform parts and the docs of the flow),111f8c2,fae585b,723dfda(release gates, the removal of platform parts is a loosening, the release order),9fc3938,79d3de1,46e4ff8,1d34eeb(the delta review's fixes),aab6f08,7cf2c12(the reviewed-governance record),aba44eb,a1ac13f(compare-and-swap, admission policy,disabledmark),ffe990f(docs condensed:docs/governance.md, values comments, schema descriptions; no behaviour change).What is the effect of this change to users?
approvals.governanceTeam.governance.*values.How does it look like?
The review for a governance change leads with the change old to new and the lines that loosen it. The audit lines are logged as listed in
docs/governance.md.Changes from the plan
Where this PR differs from the design in the epic (giantswarm/giantswarm#38902):
GovernanceRecord(a new CRD only the manager's ServiceAccount writes, set bymerge_actionwhen it merges an approved governance change), not with the newest reviewed Action; an installation without a record asks the review, which then shows the whole governance. A stale Action merged late or a hand revert could displace an order-derived baseline.merge_actionrefuses to merge a stage of an approved governance change when the record has moved since (governance_record_moved_since_plan: deny it and commit again); the write is a compare-and-swap. A ValidatingAdmissionPolicy (actions.governanceRecordPolicy, default on) denies create, update and delete ofgovernancerecordsto any identity but the release's ServiceAccount. A record written by a reviewed disable is markeddisabled, so the enable after it is not logged as a change made outside. Not covered: a cluster admin can still impersonate the ServiceAccount.Usermember of the GitHub teamapprovals.governanceTeam; unset or unreadable refuses every governance approval, so set it at deploy.tenants.platformTeamand any value that changes connector admins or workflow editors needs the team review too; widening counts as loosening.governance {mode, governedServers}rendered into the chart'sgovernancemap andgovernedServers;GovernanceChartandGovernanceMusterare unset, so every governance choice is refused until the releases that carry it are pinned.approve_action,merge_action), its governed entry with a five-read safe list and the Giant Swarm admin groups as connector admins and workflow editors are rendered by the manager; muster and the agent-platform chart no longer carry them.Any background context you can provide?
approvals.governanceTeamat deploy. Until it is set nobody can approve a governance change, which fails closed.governance: {mode, roleFloors}) and the muster release that readsgovernance.roleFloors; the release gates (GovernanceChart,GovernanceMuster) are unset until those releases exist and refuse every governance choice meanwhile.docs/governance.mdsays so.What is needed from the reviewers?
approvals.governanceTeamfor the deployment.Do the docs need to be updated?
Done:
docs/governance.md.Testing
go build ./...,go vet ./...,goimports -localgolangci-lint rungo test ./...E2E=1 go test ./internal/e2e/...make helm-lint,make test-chartFinal reviews (a second model):
go build,go vetandE2E=1 go test ./...pass at723dfda,1d34eeb,7cf2c12anda1ac13f; 105 mutants over four passes; the record's CRD, RBAC and admission policy were run on a local kube-apiserver 1.37 (13 cases: any identity but the release's ServiceAccount is refused, alsosystem:masters; the ServiceAccount creates and replaces, has no delete or patch;spec.installationother than the name is refused).golangci-lint,helm unittestand the full test set per mutant were not run by the reviewers; CI is the reference. Not run: a real GitHub or Slack (the end-to-end tests use fakes), a real three-way merge, the manager deployed on an installation. Not lab-tested: the agentlab runs do not include this repository. The drift tests against muster and agent-platform skip in CI until those repositories merge; add the sibling checkouts to CI when the releases are cut.Related pull requests